<?php 
		echo css_asset('printstyle.css' ); ?>
<body onload="<?php if(@$print == "ya"){ echo "print();";} ?>">
<table class="print" width="100%" cellspacing=0 cellpadding=0 border=1>
		<caption>Checklist Administrasi</caption>
	<thead>
		<tr><th rowspan="2">No</th><th rowspan="2">Kode Proyek</th><th rowspan="2">Nama Proyek</th>
            <th colspan="2">PPB</th><th colspan="2">PDP</th>
			<th colspan="2">PDK</th><th colspan="2">RP</th><th colspan="2">RAPK</th><th colspan="2">AK</th><th colspan="2">BC</th>
		</tr>
		<tr>
			<th>No</th>
			<th>Posisi</th>
			<th>No</th>
			<th>Posisi</th>
			<th>No</th>
			<th>Posisi</th>
			<th>No</th>
			<th>Posisi</th>
			<th>No</th>
			<th>Posisi</th>
			<th>No</th>
			<th>Posisi</th>
			<th>No</th>
			<th>Posisi</th>
		</tr>
	</thead>
	
	<tbody>
<?php $k=0; for($i=0;$i<count($data);$i++){ ?>
	<tr>
		<td><?php if ($data[$i]->project_code != @$data[$i - 1]->project_code){ $k++; echo $k;} ?></td>
		<td><?php if ($data[$i]->project_code != @$data[$i - 1]->project_code) echo $data[$i]->project_code; ?></td>
		<td><?php if ($data[$i]->project_name != @$data[$i - 1]->project_name) echo $data[$i]->project_name; ?></td>
		<td><?php if ($data[$i]->no1 != @$data[$i - 1]->no1 
                      OR $data[$i]->div1 != @$data[$i - 1]->div1) echo str_replace(",","<br />",$data[$i]->no1); ?></td>
		<td><?php if ($data[$i]->no1 != @$data[$i - 1]->no1 
                      OR $data[$i]->div1 != @$data[$i - 1]->div1) echo  str_replace(",","<br />",$data[$i]->div1); ?></td>
		<td><?php if ($data[$i]->no2 != @$data[$i - 1]->no2 
                      OR $data[$i]->div2 != @$data[$i - 1]->div2) echo  str_replace(",","<br />",$data[$i]->no2); ?></td>
		<td><?php if ($data[$i]->no2 != @$data[$i - 1]->no2 
                      OR $data[$i]->div2 != @$data[$i - 1]->div2) echo  str_replace(",","<br />",$data[$i]->div2); ?></td>
		<td><?php if ($data[$i]->no3 != @$data[$i - 1]->no3 
                      OR $data[$i]->div3 != @$data[$i - 1]->div3) echo  str_replace(",","<br />",$data[$i]->no3); ?></td>
		<td><?php if ($data[$i]->no3 != @$data[$i - 1]->no3 
                      OR $data[$i]->div3 != @$data[$i - 1]->div3) echo  str_replace(",","<br />",$data[$i]->div3); ?></td>
		<td><?php if ($data[$i]->no4 != @$data[$i - 1]->no4
                      OR $data[$i]->div4 != @$data[$i - 1]->div4) echo  str_replace(",","<br />",$data[$i]->no4); ?></td>
		<td><?php if ($data[$i]->no4 != @$data[$i - 1]->no4
                      OR $data[$i]->div4 != @$data[$i - 1]->div4) echo  str_replace(",","<br />",$data[$i]->div4); ?></td>
		<td><?php if ($data[$i]->no5 != @$data[$i - 1]->no5
                      OR $data[$i]->div5 != @$data[$i - 1]->div5) echo  str_replace(",","<br />",$data[$i]->no5); ?></td>
		<td><?php if ($data[$i]->no5 != @$data[$i - 1]->no5
                      OR $data[$i]->div5 != @$data[$i - 1]->div5) echo  str_replace(",","<br />",$data[$i]->div5); ?></td>
		<td><?php if ($data[$i]->no6 != @$data[$i - 1]->no6
                      OR $data[$i]->div6 != @$data[$i - 1]->div6) echo  str_replace(",","<br />",$data[$i]->no6); ?></td>
		<td><?php if ($data[$i]->no6 != @$data[$i - 1]->no6
                      OR $data[$i]->div6 != @$data[$i - 1]->div6) echo  str_replace(",","<br />",$data[$i]->div6); ?></td>
		<td><?php if ($data[$i]->no7 != @$data[$i - 1]->no7
                      OR $data[$i]->div7 != @$data[$i - 1]->div7) echo  str_replace(",","<br />",$data[$i]->no7); ?></td>
		<td><?php if ($data[$i]->no7 != @$data[$i - 1]->no7
                      OR $data[$i]->div7 != @$data[$i - 1]->div7) echo  str_replace(",","<br />",$data[$i]->div7); ?></td>
		
	</tr>
<?php } ?>
	</tbody>
</table></body>
<?php if(@$print != "ya"){ ?>
<script>
$(function(){
	$("#btnprint").click(function(){
		window.open('<?php echo base_url("../print/reportchecklist.html") ?>');
	});
});
</script>
<input type="submit" value="cetak" id="btnprint">
<?php } ?>